package mysql

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"column:username;type:varchar(30);unique;not null;comment:用户账号"`
	Password string `gorm:"column:password;type:varchar(100);not null;comment:用户密码"`
	Nickname string `gorm:"column:nickname;type:varchar(30);comment:用户昵称"`
	Email    string `gorm:"column:email;type:varchar(100);comment:用户邮箱"`
	Phone    string `gorm:"column:phone;type:char(11);comment:用户手机号"`
	Status   int64  `gorm:"column:status;type:tinyint(1);default:1;comment:用户状态"`
	Salt     string `gorm:"column:salt;type:varchar(20);comment:盐"`
}

type UserRealName struct {
	gorm.Model
	UserId   uint   `gorm:"column:user_id;type:int(11);unique;not null;comment:用户ID"`
	RealName string `gorm:"column:realName;type:varchar(30);not null;comment:用户真实姓名"`
	IdCard   string `gorm:"column:idCard;type:char(18);unique;not null;comment:用户身份证号"`
}

type UserAddress struct {
	gorm.Model
	UserId    uint   `gorm:"type:int(11);unique;not null;comment:用户ID"`
	Address   string `gorm:"type:varchar(50);comment:用户地址"`
	Province  string `gorm:"type:varchar(50);comment:用户省份"`
	City      string `gorm:"type:varchar(50);comment:用户城市"`
	Area      string `gorm:"type:varchar(50);comment:用户区"`
	Mobile    string `gorm:"type:char(11);comment:用户手机"`
	Name      string `gorm:"type:varchar(20);comment:用户姓名"`
	IsDefault uint   `gorm:"type:varchar(50);comment:用户地址"`
}

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
